package club.caihappy.Condition;

import club.caihappy.pojo.Color;
import org.springframework.beans.factory.FactoryBean;

/**
 * Created by DELL on 2021/10/5
 **/
//创建一个Spring定义的FactoryBean
public class ColorFactoryBean implements FactoryBean {
    //返回一个Color对象，这个对象会添加到容器中
    public Color getObject() throws Exception {
        System.out.println("ColorFactoryBean...getObject...");
        return new Color();
    }

    public Class<?> getObjectType() {
        return Color.class;
    }

    public boolean isSingleton() {
        return false;
    }
}
